﻿using System;
using System.Data;


	public class AccountsBO
	{

		private string _accountId;
		private string _branchId;
		private decimal _amount;
		private DateTime _accCrtdDt;


		public decimal Amount
		{
			get { return _amount; }
			set { _amount = value; }
		}
		public string BranchId
		{
			get { return _branchId; }
			set { _branchId = value; }
		}


		public string AccountId
		{
			get { return _accountId; }
			set { _accountId = value; }
		}


		public DateTime AccCrtdDt
		{
			get { return _accCrtdDt; }
			set { _accCrtdDt = value; }
		}

		

		AccountsDAL _accountsDal = new AccountsDAL();

		public DataTable BranchFillDropDown()
		{
			try
			{

				return _accountsDal.BranchFillDropDown();

			}

			catch
			{

				throw;

			}

		}
		public int InsertAccount()
		{
			try
			{
				return _accountsDal.CreateAccount(this);
			}
			catch (Exception ex)
			{
				throw ex;
			}

		}
		public int UpdateAccount()
		{
			try
			{
				return _accountsDal.UpdateAccount(this);
			}

			catch
			{
				throw;
			}

		}
		public DataTable AccountsDisplay()
		{
			try
			{
				return _accountsDal.Load();
			}

			catch
			{
				throw;
			}

		}
		public int DeleteAccount()
		{
			try
			{
				return _accountsDal.DeleteAccount(this);
			}

			catch (Exception ex)
			{
				throw;
			}
		}
		public int DeleteRegistrations()
		{
			try
			{
				return _accountsDal.DeleteRegistration(this);
			}

			catch
			{
				throw;
			}

		}
		public int DeleteCustomer()
		{
			try
			{
				return _accountsDal.DeleteCustomer(this);
			}

			catch
			{
				throw;
			}
		}
	}


